package mall.dao.impl;

import org.apache.commons.dbutils.PropertyHandler;

import mall.bean.OrderState;

public class OrderStatePropertyHandler implements PropertyHandler {

	@Override
	public boolean match(Class<?> parameter, Object value) {
		if (parameter.equals(OrderState.class) && value instanceof Integer) {
			return true;
		}
		return false;
	}

	@Override
	public Object apply(Class<?> parameter, Object value) {
		return OrderState.parse((int) value);
	}

}
